{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "330f25ec-8112-4c56-a5c0-8e45ac48cbd6",
   "metadata": {},
   "source": [
    "# Simple Heatmap\n",
    "\n",
    "A simple heatmap showing the relationship between two categorical variables and a numeric value.\n",
    "This example uses a small pivoted dataset to highlight value intensity across a grid."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "be4bd32e-cb62-4f6e-8ab6-9a5ece672730",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import hvplot.pandas  # noqa\n",
    "\n",
    "np.random.seed(42)\n",
    "df = pd.DataFrame({\n",
    "    'x': np.tile(['A', 'B', 'C', 'D'], 4),\n",
    "    'y': np.repeat(['W', 'X', 'Y', 'Z'], 4),\n",
    "    'value': np.random.randint(1, 10, size=16)\n",
    "})\n",
    "\n",
    "df.hvplot.heatmap(x='x', y='y', C='value', title='Basic Heatmap (Bokeh)')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "771bb895-0444-4aaf-9a1c-c0759d59b760",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import hvplot.pandas  # noqa\n",
    "hvplot.extension('matplotlib')\n",
    "\n",
    "np.random.seed(42)\n",
    "df = pd.DataFrame({\n",
    "    'x': np.tile(['A', 'B', 'C', 'D'], 4),\n",
    "    'y': np.repeat(['W', 'X', 'Y', 'Z'], 4),\n",
    "    'value': np.random.randint(1, 10, size=16)\n",
    "})\n",
    "\n",
    "df.hvplot.heatmap(x='x', y='y', C='value', title='Basic Heatmap (Matplotlib)')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b4277362-6063-402b-b321-17444c1ed706",
   "metadata": {},
   "source": [
    ":::{seealso}\n",
    "- [Heatmap Plots reference documentation](../../ref/api/manual/hvplot.hvPlot.heatmap.ipynb).\n",
    "- [Correlation Heatmap example](../statistical/correlation_heatmap.ipynb).\n",
    ":::"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
